using INTEX.DataBase;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using INTEX.DataBase.Tools;
using System.Collections;
using System.Collections.Generic;

namespace WPFExcelReport
{
    public partial class VICC_MAXORD
    {
        public string sql = "";
        public override void SetUp()
        {
            base.SetUp();
            dbConnection = app.SQLITEDB;
            SQLiteDatabase = new SQLiteDatabase(dbConnection);
        }
        public int GETORD()
        {
            sql = "UPDATE ICC_MAXORD SET MAXORD=MAXORD+1,USD2RMB=" + USD2RMB + ", RATE1=" + RATE1;
            SQLiteDatabase.ExecuteNonQuery(sql);
            sql = "SELECT* FROM ICC_MAXORD";
            DataTable TBResult = SQLiteDatabase.GetDataTable(sql);
            foreach (DataRow row in TBResult.Rows)
            {
                MAXORD = int.Parse(row["MAXORD"].ToString());
                USD2RMB = double.Parse(row["USD2RMB"].ToString());
                RATE1 = double.Parse(row["RATE1"].ToString());
            }
            return MAXORD;
        }
    }

    public partial class VICC_MAXORD
    {   
        public double ID
        {
            get;
            set;
        }
        public int MAXORD
        {
            get;
            set; 
        } //lENGth 6
        public double USD2RMB
        {
            get;
            set;
        }
        public double RATE1
        {
            get;
            set;
        }   
    }

}
